package com.topdt.jbpm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thx.common.service.BaseManager;
import com.topdt.jbpm.dao.ArcTemplateDao;
import com.topdt.jbpm.model.ArcTemplate;

@Service
@Transactional(readOnly = true)
public class ArcTemplateService extends BaseManager<ArcTemplate>{
	@Autowired
	private ArcTemplateDao arcTemplateDao;
	
	public List<ArcTemplate> findByName(String name) {
		return arcTemplateDao.findByName(name);
	}
	
	public List<ArcTemplate> findByRecordId(String recordId) {
		return arcTemplateDao.findByRecordId(recordId);
	}
	
	public List<ArcTemplate> find() {
		return arcTemplateDao.find();
	}
	@Transactional(readOnly = false)
	public void saveOrUpdate(ArcTemplate arcTemplate){
		arcTemplateDao.saveOrUpdate(arcTemplate);
	}
}
